package com.java.al.swing;

import javax.swing.JFrame;
import javax.swing.SwingUtilities;
/**
 * Swing工具类!
 */

public class SwingConsole {
	public static void run( final JFrame f , final int width , final int heigh){
		SwingUtilities.invokeLater( new Runnable(){
			public void run(){
				f.setTitle( f.getClass().getSimpleName() );
				f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
				f.setSize(width , heigh);
				f.setVisible(true);
			}
		});
	}
}
